home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / Text / Show / Less / less-252 / configure < prev    next >
Text File  |  1995-01-05  |  47KB  |  1,768 lines

  1. #!/bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.1 
  5. # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
  6. #
  7. # This configure script is free software; the Free Software Foundation
  8. # gives unlimited permission to copy, distribute and modify it.
  9.  
  10. # Defaults:
  11. ac_help=
  12. ac_default_prefix=/gnu
  13. # Any additions from configure.in:
  14.  
  15. # Initialize some variables set by options.
  16. # The variables have the same names as the options, with
  17. # dashes changed to underlines.
  18. build=NONE
  19. cache_file=./config.cache
  20. exec_prefix=NONE
  21. host=NONE
  22. no_create=
  23. nonopt=NONE
  24. no_recursion=
  25. prefix=NONE
  26. program_prefix=NONE
  27. program_suffix=NONE
  28. program_transform_name=s,x,x,
  29. silent=
  30. site=
  31. srcdir=
  32. target=NONE
  33. verbose=
  34. x_includes=NONE
  35. x_libraries=NONE
  36.  
  37. # Initialize some other variables.
  38. subdirs=
  39.  
  40. ac_prev=
  41. for ac_option
  42. do
  43.  
  44.   # If the previous option needs an argument, assign it.
  45.   if test -n "$ac_prev"; then
  46.     eval "$ac_prev=\$ac_option"
  47.     ac_prev=
  48.     continue
  49.   fi
  50.  
  51.   case "$ac_option" in
  52.   -*=*) ac_optarg=`/bin/echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  53.   *) ac_optarg= ;;
  54.   esac
  55.  
  56.   # Accept the important Cygnus configure options, so we can diagnose typos.
  57.  
  58.   case "$ac_option" in
  59.  
  60.   -build | --build | --buil | --bui | --bu | --b)
  61.     ac_prev=build ;;
  62.   -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  63.     build="$ac_optarg" ;;
  64.  
  65.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  66.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  67.     ac_prev=cache_file ;;
  68.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  69.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  70.     cache_file="$ac_optarg" ;;
  71.  
  72.   -disable-* | --disable-*)
  73.     ac_feature=`/bin/echo $ac_option|sed -e 's/-*disable-//'`
  74.     # Reject names that are not valid shell variable names.
  75.     if test -n "`/bin/echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  76.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  77.     fi
  78.     ac_feature=`/bin/echo $ac_feature| sed 's/-/_/g'`
  79.     eval "enable_${ac_feature}=no" ;;
  80.  
  81.   -enable-* | --enable-*)
  82.     ac_feature=`/bin/echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  83.     # Reject names that are not valid shell variable names.
  84.     if test -n "`/bin/echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  85.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  86.     fi
  87.     ac_feature=`/bin/echo $ac_feature| sed 's/-/_/g'`
  88.     case "$ac_option" in
  89.       *=*) ;;
  90.       *) ac_optarg=yes ;;
  91.     esac
  92.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  93.  
  94.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  95.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  96.   | --exec | --exe | --ex)
  97.     ac_prev=exec_prefix ;;
  98.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  99.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  100.   | --exec=* | --exe=* | --ex=*)
  101.     exec_prefix="$ac_optarg" ;;
  102.  
  103.   -gas | --gas | --ga | --g)
  104.     # Obsolete; use --with-gas.
  105.     with_gas=yes ;;
  106.  
  107.   -help | --help | --hel | --he)
  108.     # Omit some internal or obsolete options to make the list less imposing.
  109.     # This message is too long to be a string in the A/UX 3.1 sh.
  110.     cat << EOF
  111. Usage: configure [options] [host]
  112. Options: [defaults in brackets after descriptions]
  113. Configuration:
  114.   --cache-file=FILE       cache test results in FILE
  115.   --help                  print this message
  116.   --no-create             do not create output files
  117.   --quiet, --silent       do not print \`checking...' messages
  118.   --version               print the version of autoconf that created configure
  119. Directory and file names:
  120.   --prefix=PREFIX         install architecture-independent files in PREFIX
  121.                           [$ac_default_prefix]
  122.   --exec-prefix=PREFIX    install architecture-dependent files in PREFIX
  123.                           [same as prefix]
  124.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  125.   --program-prefix=PREFIX prepend PREFIX to installed program names
  126.   --program-suffix=SUFFIX append SUFFIX to installed program names
  127.   --program-transform-name=PROGRAM run sed PROGRAM on installed program names
  128. Host type:
  129.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  130.   --host=HOST             configure for HOST [guessed]
  131.   --target=TARGET         configure for TARGET [TARGET=HOST]
  132. Features and packages:
  133.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  134.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  135.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  136.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  137.   --x-includes=DIR        X include files are in DIR
  138.   --x-libraries=DIR       X library files are in DIR
  139. --enable and --with options recognized:$ac_help
  140. EOF
  141.     exit 0 ;;
  142.  
  143.   -host | --host | --hos | --ho)
  144.     ac_prev=host ;;
  145.   -host=* | --host=* | --hos=* | --ho=*)
  146.     host="$ac_optarg" ;;
  147.  
  148.   -nfp | --nfp | --nf)
  149.     # Obsolete; use --without-fp.
  150.     with_fp=no ;;
  151.  
  152.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  153.   | --no-cr | --no-c)
  154.     no_create=yes ;;
  155.  
  156.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  157.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  158.     no_recursion=yes ;;
  159.  
  160.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  161.     ac_prev=prefix ;;
  162.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  163.     prefix="$ac_optarg" ;;
  164.  
  165.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  166.   | --program-pre | --program-pr | --program-p)
  167.     ac_prev=program_prefix ;;
  168.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  169.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  170.     program_prefix="$ac_optarg" ;;
  171.  
  172.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  173.   | --program-suf | --program-su | --program-s)
  174.     ac_prev=program_suffix ;;
  175.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  176.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  177.     program_suffix="$ac_optarg" ;;
  178.  
  179.   -program-transform-name | --program-transform-name \
  180.   | --program-transform-nam | --program-transform-na \
  181.   | --program-transform-n | --program-transform- \
  182.   | --program-transform | --program-transfor \
  183.   | --program-transfo | --program-transf \
  184.   | --program-trans | --program-tran \
  185.   | --progr-tra | --program-tr | --program-t)
  186.     ac_prev=program_transform_name ;;
  187.   -program-transform-name=* | --program-transform-name=* \
  188.   | --program-transform-nam=* | --program-transform-na=* \
  189.   | --program-transform-n=* | --program-transform-=* \
  190.   | --program-transform=* | --program-transfor=* \
  191.   | --program-transfo=* | --program-transf=* \
  192.   | --program-trans=* | --program-tran=* \
  193.   | --progr-tra=* | --program-tr=* | --program-t=*)
  194.     program_transform_name="$ac_optarg" ;;
  195.  
  196.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  197.   | -silent | --silent | --silen | --sile | --sil)
  198.     silent=yes ;;
  199.  
  200.   -site | --site | --sit)
  201.     ac_prev=site ;;
  202.   -site=* | --site=* | --sit=*)
  203.     site="$ac_optarg" ;;
  204.  
  205.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  206.     ac_prev=srcdir ;;
  207.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  208.     srcdir="$ac_optarg" ;;
  209.  
  210.   -target | --target | --targe | --targ | --tar | --ta | --t)
  211.     ac_prev=target ;;
  212.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  213.     target="$ac_optarg" ;;
  214.  
  215.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  216.     verbose=yes ;;
  217.  
  218.   -version | --version | --versio | --versi | --vers)
  219.     echo "configure generated by autoconf version 2.1"
  220.     exit 0 ;;
  221.  
  222.   -with-* | --with-*)
  223.     ac_package=`/bin/echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  224.     # Reject names that are not valid shell variable names.
  225.     if test -n "`/bin/echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  226.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  227.     fi
  228.     ac_package=`/bin/echo $ac_package| sed 's/-/_/g'`
  229.     case "$ac_option" in
  230.       *=*) ;;
  231.       *) ac_optarg=yes ;;
  232.     esac
  233.     eval "with_${ac_package}='$ac_optarg'" ;;
  234.  
  235.   -without-* | --without-*)
  236.     ac_package=`/bin/echo $ac_option|sed -e 's/-*without-//'`
  237.     # Reject names that are not valid shell variable names.
  238.     if test -n "`/bin/echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  239.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  240.     fi
  241.     ac_package=`/bin/echo $ac_package| sed 's/-/_/g'`
  242.     eval "with_${ac_package}=no" ;;
  243.  
  244.   --x)
  245.     # Obsolete; use --with-x.
  246.     with_x=yes ;;
  247.  
  248.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  249.   | --x-incl | --x-inc | --x-in | --x-i)
  250.     ac_prev=x_includes ;;
  251.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  252.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  253.     x_includes="$ac_optarg" ;;
  254.  
  255.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  256.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  257.     ac_prev=x_libraries ;;
  258.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  259.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  260.     x_libraries="$ac_optarg" ;;
  261.  
  262.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  263.     ;;
  264.  
  265.   *) 
  266.     if test -n "`/bin/echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  267.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  268.     fi
  269.     if test "x$nonopt" != xNONE; then
  270.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  271.     fi
  272.     nonopt="$ac_option"
  273.     ;;
  274.  
  275.   esac
  276. done
  277.  
  278. if test -n "$ac_prev"; then
  279.   { echo "configure: error: missing argument to --`/bin/echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  280. fi
  281.  
  282. trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  283.  
  284. # File descriptor usage:
  285. # 0 unused; standard input
  286. # 1 file creation
  287. # 2 errors and warnings
  288. # 3 unused; some systems may open it to /dev/tty
  289. # 4 checking for... messages and results
  290. # 5 compiler messages saved in config.log
  291. if test "$silent" = yes; then
  292.   exec 4>/dev/null
  293. else
  294.   exec 4>&1
  295. fi
  296. exec 5>./config.log
  297.  
  298. echo "\
  299. This file contains any messages produced by compilers while
  300. running configure, to aid debugging if configure makes a mistake.
  301. " 1>&5
  302.  
  303. # Strip out --no-create and --no-recursion so they do not pile up.
  304. # Also quote any args containing shell metacharacters.
  305. ac_configure_args=
  306. for ac_arg
  307. do
  308.   case "$ac_arg" in
  309.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  310.   | --no-cr | --no-c) ;;
  311.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  312.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  313.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  314.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  315.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  316.   esac
  317. done
  318.  
  319. # NLS nuisances.
  320. # Only set LANG and LC_ALL to C if already set.
  321. # These must not be set unconditionally because not all systems understand
  322. # e.g. LANG=C (notably SCO).
  323. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  324. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  325.  
  326. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  327. rm -rf conftest* confdefs.h
  328. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  329. /bin/echo > confdefs.h
  330.  
  331. # A filename unique to this package, relative to the directory that
  332. # configure is in, which we can look for to find out if srcdir is correct.
  333. ac_unique_file=forwback.c
  334.  
  335. # Find the source files, if location was not specified.
  336. if test -z "$srcdir"; then
  337.   ac_srcdir_defaulted=yes
  338.   # Try the directory containing this script, then its parent.
  339.   ac_prog=$0
  340.   ac_confdir=`/bin/echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  341.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  342.   srcdir=$ac_confdir
  343.   if test ! -r $srcdir/$ac_unique_file; then
  344.     srcdir=..
  345.   fi
  346. else
  347.   ac_srcdir_defaulted=no
  348. fi
  349. if test ! -r $srcdir/$ac_unique_file; then
  350.   if test "$ac_srcdir_defaulted" = yes; then
  351.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  352.   else
  353.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  354.   fi
  355. fi
  356. srcdir=`/bin/echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  357.  
  358. # Prefer explicitly selected file to automatically selected ones.
  359. if test -z "$CONFIG_SITE"; then
  360.   if test "x$prefix" != xNONE; then
  361.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  362.   else
  363.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  364.   fi
  365. fi
  366. for ac_site_file in $CONFIG_SITE; do
  367.   if test -r "$ac_site_file"; then
  368.     echo "loading site script $ac_site_file"
  369.     . "$ac_site_file"
  370.   fi
  371. done
  372.  
  373. if test -r "$cache_file"; then
  374.   echo "loading cache $cache_file"
  375.   . $cache_file
  376. else
  377.   echo "creating cache $cache_file"
  378.   > $cache_file
  379. fi
  380.  
  381. ac_ext=c
  382. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  383. ac_cpp='$CPP $CPPFLAGS'
  384. ac_compile='${CC-cc} $CFLAGS $CPPFLAGS conftest.$ac_ext -c 1>&5 2>&5'
  385. ac_link='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext -o conftest $LIBS 1>&5 2>&5'
  386.  
  387. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  388.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  389.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  390.     ac_n= ac_c='
  391. ' ac_t='    '
  392.   else
  393.     ac_n=-n ac_c= ac_t=
  394.   fi
  395. else
  396.   ac_n= ac_c='\c' ac_t=
  397. fi
  398.  
  399.  
  400.  
  401.  
  402. # Extract the first word of "gcc", so it can be a program name with args.
  403. set dummy gcc; ac_word=$2
  404. /bin/echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
  405. if eval "test \"`echo '${'ac_cv_prog_CC'+set}'`\" = set"; then
  406.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  407. else
  408.   if test -n "$CC"; then
  409.   ac_cv_prog_CC="$CC" # Let the user override the test.
  410. else
  411.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  412.   for ac_dir in $PATH; do
  413.     test -z "$ac_dir" && ac_dir=.
  414.     if test -f $ac_dir/$ac_word; then
  415.       ac_cv_prog_CC="gcc"
  416.       break
  417.     fi
  418.   done
  419.   IFS="$ac_save_ifs"
  420.   test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
  421. fi
  422. fi
  423. CC="$ac_cv_prog_CC"
  424. if test -n "$CC"; then
  425.   /bin/echo "$ac_t""$CC" 1>&4
  426. else
  427.   /bin/echo "$ac_t""no" 1>&4
  428. fi
  429.  
  430.  
  431. /bin/echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&4
  432. if eval "test \"`echo '${'ac_cv_prog_gcc'+set}'`\" = set"; then
  433.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  434. else
  435.   cat > conftest.c <<EOF
  436. #ifdef __GNUC__
  437.   yes;
  438. #endif
  439. EOF
  440. if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
  441.   ac_cv_prog_gcc=yes
  442. else
  443.   ac_cv_prog_gcc=no
  444. fi
  445. fi
  446. /bin/echo "$ac_t""$ac_cv_prog_gcc" 1>&4
  447. if test $ac_cv_prog_gcc = yes; then
  448.   GCC=yes
  449.   if test "${CFLAGS+set}" != set; then
  450.     /bin/echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&4
  451. if eval "test \"`echo '${'ac_cv_prog_gcc_g'+set}'`\" = set"; then
  452.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  453. else
  454.   echo 'void f(){}' > conftest.c
  455. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  456.   ac_cv_prog_gcc_g=yes
  457. else
  458.   ac_cv_prog_gcc_g=no
  459. fi
  460. rm -f conftest*
  461.  
  462. fi
  463.     /bin/echo "$ac_t""$ac_cv_prog_gcc_g" 1>&4
  464.     if test $ac_cv_prog_gcc_g = yes; then
  465.       # Amiga hack - suppress automatically using -g for now
  466.       # Also default to using -O2
  467.       CFLAGS="-O2"
  468.     else
  469.       CFLAGS="-O2"
  470.     fi
  471.   fi
  472. else
  473.   GCC=
  474.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  475. fi
  476.  
  477. /bin/echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&4
  478. # On Suns, sometimes $CPP names a directory.
  479. if test -n "$CPP" && test -d "$CPP"; then
  480.   CPP=
  481. fi
  482. if test -z "$CPP"; then
  483. if eval "test \"`echo '${'ac_cv_prog_CPP'+set}'`\" = set"; then
  484.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  485. else
  486.     # This must be in double quotes, not single quotes, because CPP may get
  487.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  488.   CPP="${CC-cc} -E"
  489.   # On the NeXT, cc -E runs the code through the compiler's parser,
  490.   # not just through cpp.
  491.   cat > conftest.$ac_ext <<EOF
  492. #line 493 "configure"
  493. #include "confdefs.h"
  494. #include <assert.h>
  495. Syntax Error
  496. EOF
  497. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  498. ac_err=`grep -v '^ *+' conftest.out`
  499. if test -z "$ac_err"; then
  500.   :
  501. else
  502.   /bin/echo "$ac_err" >&5
  503.   rm -rf conftest*
  504.   CPP="${CC-cc} -E -traditional-cpp"
  505.   cat > conftest.$ac_ext <<EOF
  506. #line 507 "configure"
  507. #include "confdefs.h"
  508. #include <assert.h>
  509. Syntax Error
  510. EOF
  511. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  512. ac_err=`grep -v '^ *+' conftest.out`
  513. if test -z "$ac_err"; then
  514.   :
  515. else
  516.   /bin/echo "$ac_err" >&5
  517.   rm -rf conftest*
  518.   CPP=/lib/cpp
  519. fi
  520. rm -f conftest*
  521. fi
  522. rm -f conftest*
  523.   ac_cv_prog_CPP="$CPP"
  524. fi
  525. fi
  526. CPP="$ac_cv_prog_CPP"
  527. /bin/echo "$ac_t""$CPP" 1>&4
  528.  
  529. if test $ac_cv_prog_gcc = yes; then
  530.   /bin/echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&4
  531. if eval "test \"`echo '${'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
  532.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  533. else
  534.     ac_pattern="Autoconf.*'x'"
  535.   cat > conftest.$ac_ext <<EOF
  536. #line 537 "configure"
  537. #include "confdefs.h"
  538. #include <sgtty.h>
  539. Autoconf TIOCGETP
  540. EOF
  541. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  542.   egrep "$ac_pattern" >/dev/null 2>&1; then
  543.   rm -rf conftest*
  544.   ac_cv_prog_gcc_traditional=yes
  545. else
  546.   rm -rf conftest*
  547.   ac_cv_prog_gcc_traditional=no
  548. fi
  549. rm -f conftest*
  550.  
  551.  
  552.   if test $ac_cv_prog_gcc_traditional = no; then
  553.     cat > conftest.$ac_ext <<EOF
  554. #line 555 "configure"
  555. #include "confdefs.h"
  556. #include <termio.h>
  557. Autoconf TCGETA
  558. EOF
  559. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  560.   egrep "$ac_pattern" >/dev/null 2>&1; then
  561.   rm -rf conftest*
  562.   ac_cv_prog_gcc_traditional=yes
  563. fi
  564. rm -f conftest*
  565.  
  566.   fi
  567. fi
  568.   /bin/echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&4
  569.   if test $ac_cv_prog_gcc_traditional = yes; then
  570.     CC="$CC -traditional"
  571.   fi
  572. fi
  573.  
  574. ac_aux_dir=
  575. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  576.   if test -f $ac_dir/install-sh; then
  577.     ac_aux_dir=$ac_dir
  578.     ac_install_sh="$ac_aux_dir/install-sh -c"
  579.     break
  580.   elif test -f $ac_dir/install.sh; then
  581.     ac_aux_dir=$ac_dir
  582.     ac_install_sh="$ac_aux_dir/install.sh -c"
  583.     break
  584.   fi
  585. done
  586. if test -z "$ac_aux_dir"; then
  587.   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  588. fi
  589. ac_config_guess=$ac_aux_dir/config.guess
  590. ac_config_sub=$ac_aux_dir/config.sub
  591. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  592.  
  593. # Find a good install program.  We prefer a C program (faster),
  594. # so one script is as good as another.  But avoid the broken or
  595. # incompatible versions:
  596. # SysV /etc/install, /usr/sbin/install
  597. # SunOS /usr/etc/install
  598. # IRIX /sbin/install
  599. # AIX /bin/install
  600. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  601. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  602. # ./install, which can be erroneously created by make from ./install.sh.
  603. /bin/echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&4
  604. if test -z "$INSTALL"; then
  605. if eval "test \"`echo '${'ac_cv_path_install'+set}'`\" = set"; then
  606.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  607. else
  608.     IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  609.   for ac_dir in $PATH; do
  610.     case "$ac_dir" in
  611.     ''|.|/gnu/etc) ;;
  612.     *)
  613.       # OSF1 and SCO ODT 3.0 have their own names for install.
  614.       for ac_prog in ginstall installbsd scoinst install; do
  615.         if test -f $ac_dir/$ac_prog; then
  616.       if test $ac_prog = install &&
  617.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  618.         # AIX install.  It has an incompatible calling convention.
  619.         # OSF/1 installbsd also uses dspmsg, but is usable.
  620.         :
  621.       else
  622.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  623.         break 2
  624.       fi
  625.     fi
  626.       done
  627.       ;;
  628.     esac
  629.   done
  630.   IFS="$ac_save_ifs"
  631.   # As a last resort, use the slow shell script.
  632.   test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"
  633. fi
  634.   INSTALL="$ac_cv_path_install"
  635. fi
  636. /bin/echo "$ac_t""$INSTALL" 1>&4
  637.  
  638. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  639. # It thinks the first close brace ends the variable substitution.
  640. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  641.  
  642. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  643.  
  644.  
  645. TERMLIBS=
  646. /bin/echo $ac_n "checking for -lcurses""... $ac_c" 1>&4
  647. if eval "test \"`echo '${'ac_cv_lib_curses'+set}'`\" = set"; then
  648.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  649. else
  650.   ac_save_LIBS="$LIBS"
  651. LIBS="$LIBS -lcurses "
  652. cat > conftest.$ac_ext <<EOF
  653. #line 654 "configure"
  654. #include "confdefs.h"
  655.  
  656. int main() { return 0; }
  657. int t() {
  658. main()
  659. ; return 0; }
  660. EOF
  661. if eval $ac_link; then
  662.   rm -rf conftest*
  663.   ac_cv_lib_curses=yes
  664. else
  665.   rm -rf conftest*
  666.   ac_cv_lib_curses=no
  667. fi
  668. rm -f conftest*
  669. LIBS="$ac_save_LIBS"
  670.  
  671. fi
  672. /bin/echo "$ac_t""$ac_cv_lib_curses" 1>&4
  673. if test "$ac_cv_lib_curses" = yes; then
  674.   TERMLIBS="$TERMLIBS -lcurses"
  675. fi
  676.  
  677. /bin/echo $ac_n "checking for -ltermcap""... $ac_c" 1>&4
  678. if eval "test \"`echo '${'ac_cv_lib_termcap'+set}'`\" = set"; then
  679.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  680. else
  681.   ac_save_LIBS="$LIBS"
  682. LIBS="$LIBS -ltermcap "
  683. cat > conftest.$ac_ext <<EOF
  684. #line 685 "configure"
  685. #include "confdefs.h"
  686.  
  687. int main() { return 0; }
  688. int t() {
  689. main()
  690. ; return 0; }
  691. EOF
  692. if eval $ac_link; then
  693.   rm -rf conftest*
  694.   ac_cv_lib_termcap=yes
  695. else
  696.   rm -rf conftest*
  697.   ac_cv_lib_termcap=no
  698. fi
  699. rm -f conftest*
  700. LIBS="$ac_save_LIBS"
  701.  
  702. fi
  703. /bin/echo "$ac_t""$ac_cv_lib_termcap" 1>&4
  704. if test "$ac_cv_lib_termcap" = yes; then
  705.   TERMLIBS="$TERMLIBS -ltermcap"
  706. fi
  707.  
  708. /bin/echo $ac_n "checking for -ltermlib""... $ac_c" 1>&4
  709. if eval "test \"`echo '${'ac_cv_lib_termlib'+set}'`\" = set"; then
  710.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  711. else
  712.   ac_save_LIBS="$LIBS"
  713. LIBS="$LIBS -ltermlib "
  714. cat > conftest.$ac_ext <<EOF
  715. #line 716 "configure"
  716. #include "confdefs.h"
  717.  
  718. int main() { return 0; }
  719. int t() {
  720. main()
  721. ; return 0; }
  722. EOF
  723. if eval $ac_link; then
  724.   rm -rf conftest*
  725.   ac_cv_lib_termlib=yes
  726. else
  727.   rm -rf conftest*
  728.   ac_cv_lib_termlib=no
  729. fi
  730. rm -f conftest*
  731. LIBS="$ac_save_LIBS"
  732.  
  733. fi
  734. /bin/echo "$ac_t""$ac_cv_lib_termlib" 1>&4
  735. if test "$ac_cv_lib_termlib" = yes; then
  736.   have_termlib=yes
  737. else
  738.   have_termlib=no
  739. fi
  740.  
  741. /bin/echo $ac_n "checking for -lgen""... $ac_c" 1>&4
  742. if eval "test \"`echo '${'ac_cv_lib_gen'+set}'`\" = set"; then
  743.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  744. else
  745.   ac_save_LIBS="$LIBS"
  746. LIBS="$LIBS -lgen "
  747. cat > conftest.$ac_ext <<EOF
  748. #line 749 "configure"
  749. #include "confdefs.h"
  750.  
  751. int main() { return 0; }
  752. int t() {
  753. main()
  754. ; return 0; }
  755. EOF
  756. if eval $ac_link; then
  757.   rm -rf conftest*
  758.   ac_cv_lib_gen=yes
  759. else
  760.   rm -rf conftest*
  761.   ac_cv_lib_gen=no
  762. fi
  763. rm -f conftest*
  764. LIBS="$ac_save_LIBS"
  765.  
  766. fi
  767. /bin/echo "$ac_t""$ac_cv_lib_gen" 1>&4
  768. if test "$ac_cv_lib_gen" = yes; then
  769.   LIBS="$LIBS -lgen"
  770. fi
  771.  
  772. /bin/echo $ac_n "checking for -lintl""... $ac_c" 1>&4
  773. if eval "test \"`echo '${'ac_cv_lib_intl'+set}'`\" = set"; then
  774.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  775. else
  776.   ac_save_LIBS="$LIBS"
  777. LIBS="$LIBS -lintl "
  778. cat > conftest.$ac_ext <<EOF
  779. #line 780 "configure"
  780. #include "confdefs.h"
  781.  
  782. int main() { return 0; }
  783. int t() {
  784. main()
  785. ; return 0; }
  786. EOF
  787. if eval $ac_link; then
  788.   rm -rf conftest*
  789.   ac_cv_lib_intl=yes
  790. else
  791.   rm -rf conftest*
  792.   ac_cv_lib_intl=no
  793. fi
  794. rm -f conftest*
  795. LIBS="$ac_save_LIBS"
  796.  
  797. fi
  798. /bin/echo "$ac_t""$ac_cv_lib_intl" 1>&4
  799. if test "$ac_cv_lib_intl" = yes; then
  800.   LIBS="$LIBS -lintl"
  801. fi
  802.  
  803.  
  804. echo "checking termlib" 1>&4
  805. SAVE_LIBS=$LIBS
  806. LIBS="$LIBS $TERMLIBS"
  807. cat > conftest.$ac_ext <<EOF
  808. #line 809 "configure"
  809. #include "confdefs.h"
  810.  
  811. int main() { return 0; }
  812. int t() {
  813. tgetent(0); tgetflag(0); tgetnum(0); tgetstr(0);
  814. ; return 0; }
  815. EOF
  816. if eval $ac_link; then
  817.   rm -rf conftest*
  818.   termok=yes
  819. else
  820.   rm -rf conftest*
  821.   termok=no
  822. fi
  823. rm -f conftest*
  824.  
  825. if test $termok = no; then
  826.   LIBS="$SAVE_LIBS"
  827.   if test $have_termlib = yes; then
  828.     LIBS="$LIBS -ltermlib"
  829.   fi
  830. fi
  831.  
  832. # If we cannot run a trivial program, we must be cross compiling.
  833. /bin/echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&4
  834. if eval "test \"`echo '${'ac_cv_c_cross'+set}'`\" = set"; then
  835.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  836. else
  837.   if test "$cross_compiling" = yes; then
  838.   ac_cv_cross=yes
  839. else
  840. cat > conftest.$ac_ext <<EOF
  841. #line 842 "configure"
  842. #include "confdefs.h"
  843. main(){return(0);}
  844. EOF
  845. eval $ac_link
  846. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  847.   ac_cv_c_cross=no
  848. else
  849.   ac_cv_c_cross=yes
  850. fi
  851. fi
  852. rm -fr conftest*
  853. fi
  854. cross_compiling=$ac_cv_c_cross
  855. /bin/echo "$ac_t""$ac_cv_c_cross" 1>&4
  856.  
  857. /bin/echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&4
  858. if eval "test \"`echo '${'ac_cv_header_stdc'+set}'`\" = set"; then
  859.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  860. else
  861.   cat > conftest.$ac_ext <<EOF
  862. #line 863 "configure"
  863. #include "confdefs.h"
  864. #include <stdlib.h>
  865. #include <stdarg.h>
  866. #include <string.h>
  867. #include <float.h>
  868. EOF
  869. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  870. ac_err=`grep -v '^ *+' conftest.out`
  871. if test -z "$ac_err"; then
  872.   rm -rf conftest*
  873.   ac_cv_header_stdc=yes
  874. else
  875.   /bin/echo "$ac_err" >&5
  876.   rm -rf conftest*
  877.   ac_cv_header_stdc=no
  878. fi
  879. rm -f conftest*
  880.  
  881. if test $ac_cv_header_stdc = yes; then
  882.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  883. cat > conftest.$ac_ext <<EOF
  884. #line 885 "configure"
  885. #include "confdefs.h"
  886. #include <string.h>
  887. EOF
  888. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  889.   egrep "memchr" >/dev/null 2>&1; then
  890.   :
  891. else
  892.   rm -rf conftest*
  893.   ac_cv_header_stdc=no
  894. fi
  895. rm -f conftest*
  896.  
  897. fi
  898.  
  899. if test $ac_cv_header_stdc = yes; then
  900.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  901. cat > conftest.$ac_ext <<EOF
  902. #line 903 "configure"
  903. #include "confdefs.h"
  904. #include <stdlib.h>
  905. EOF
  906. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  907.   egrep "free" >/dev/null 2>&1; then
  908.   :
  909. else
  910.   rm -rf conftest*
  911.   ac_cv_header_stdc=no
  912. fi
  913. rm -f conftest*
  914.  
  915. fi
  916.  
  917. if test $ac_cv_header_stdc = yes; then
  918.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  919. if test "$cross_compiling" = yes; then
  920.   ac_cv_header_stdc=no
  921. else
  922. cat > conftest.$ac_ext <<EOF
  923. #line 924 "configure"
  924. #include "confdefs.h"
  925. #include <ctype.h>
  926. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  927. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  928. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  929. int main () { int i; for (i = 0; i < 256; i++)
  930. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  931. exit (0); }
  932.  
  933. EOF
  934. eval $ac_link
  935. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  936.   :
  937. else
  938.   ac_cv_header_stdc=no
  939. fi
  940. fi
  941. rm -fr conftest*
  942. fi
  943. fi
  944. /bin/echo "$ac_t""$ac_cv_header_stdc" 1>&4
  945. if test $ac_cv_header_stdc = yes; then
  946.   cat >> confdefs.h <<\EOF
  947. #define STDC_HEADERS 1
  948. EOF
  949.  
  950. fi
  951.  
  952. for ac_hdr in ctype.h errno.h fcntl.h stdio.h termcap.h termio.h termios.h time.h unistd.h values.h sys/ioctl.h sys/stream.h sys/ptem.h
  953. do
  954. ac_safe=`/bin/echo "$ac_hdr" | tr './\055' '___'`
  955. /bin/echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&4
  956. if eval "test \"`echo '${'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  957.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  958. else
  959.   cat > conftest.$ac_ext <<EOF
  960. #line 961 "configure"
  961. #include "confdefs.h"
  962. #include <$ac_hdr>
  963. EOF
  964. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  965. ac_err=`grep -v '^ *+' conftest.out`
  966. if test -z "$ac_err"; then
  967.   rm -rf conftest*
  968.   eval "ac_cv_header_$ac_safe=yes"
  969. else
  970.   /bin/echo "$ac_err" >&5
  971.   rm -rf conftest*
  972.   eval "ac_cv_header_$ac_safe=no"
  973. fi
  974. rm -f conftest*
  975. fi
  976. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  977.   /bin/echo "$ac_t""yes" 1>&4
  978.     ac_tr_hdr=HAVE_`/bin/echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
  979.   cat >> confdefs.h <<EOF
  980. #define $ac_tr_hdr 1
  981. EOF
  982.  
  983. else
  984.   /bin/echo "$ac_t""no" 1>&4
  985. fi
  986. done
  987.  
  988.  
  989. /bin/echo $ac_n "checking for off_t""... $ac_c" 1>&4
  990. if eval "test \"`echo '${'ac_cv_type_off_t'+set}'`\" = set"; then
  991.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  992. else
  993.   cat > conftest.$ac_ext <<EOF
  994. #line 995 "configure"
  995. #include "confdefs.h"
  996. #include <sys/types.h>
  997. #if STDC_HEADERS
  998. #include <stdlib.h>
  999. #endif
  1000. EOF
  1001. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1002.   egrep "off_t" >/dev/null 2>&1; then
  1003.   rm -rf conftest*
  1004.   ac_cv_type_off_t=yes
  1005. else
  1006.   rm -rf conftest*
  1007.   ac_cv_type_off_t=no
  1008. fi
  1009. rm -f conftest*
  1010.  
  1011. fi
  1012. /bin/echo "$ac_t""$ac_cv_type_off_t" 1>&4
  1013. if test $ac_cv_type_off_t = no; then
  1014.   cat >> confdefs.h <<\EOF
  1015. #define off_t long
  1016. EOF
  1017.  
  1018. fi
  1019.  
  1020. echo "checking for void" 1>&4
  1021. cat > conftest.$ac_ext <<EOF
  1022. #line 1023 "configure"
  1023. #include "confdefs.h"
  1024.  
  1025. int main() { return 0; }
  1026. int t() {
  1027. void *foo = 0;
  1028. ; return 0; }
  1029. EOF
  1030. if eval $ac_link; then
  1031.   rm -rf conftest*
  1032.   cat >> confdefs.h <<\EOF
  1033. #define HAVE_VOID 1
  1034. EOF
  1035.  
  1036. fi
  1037. rm -f conftest*
  1038.  
  1039. echo "checking for time_t" 1>&4
  1040. cat > conftest.$ac_ext <<EOF
  1041. #line 1042 "configure"
  1042. #include "confdefs.h"
  1043. #include <time.h>
  1044. int main() { return 0; }
  1045. int t() {
  1046. time_t t = 0;
  1047. ; return 0; }
  1048. EOF
  1049. if eval $ac_link; then
  1050.   rm -rf conftest*
  1051.   cat >> confdefs.h <<\EOF
  1052. #define HAVE_TIME_T 1
  1053. EOF
  1054.  
  1055. fi
  1056. rm -f conftest*
  1057.  
  1058.  
  1059. /bin/echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&4
  1060. if eval "test \"`echo '${'ac_cv_type_signal'+set}'`\" = set"; then
  1061.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  1062. else
  1063.   cat > conftest.$ac_ext <<EOF
  1064. #line 1065 "configure"
  1065. #include "confdefs.h"
  1066. #include <sys/types.h>
  1067. #include <signal.h>
  1068. #ifdef signal
  1069. #undef signal
  1070. #endif
  1071. extern void (*signal ()) ();
  1072. int main() { return 0; }
  1073. int t() {
  1074. int i;
  1075. ; return 0; }
  1076. EOF
  1077. if eval $ac_compile; then
  1078.   rm -rf conftest*
  1079.   ac_cv_type_signal=void
  1080. else
  1081.   rm -rf conftest*
  1082.   ac_cv_type_signal=int
  1083. fi
  1084. rm -f conftest*
  1085.  
  1086. fi
  1087. /bin/echo "$ac_t""$ac_cv_type_signal" 1>&4
  1088. cat >> confdefs.h <<EOF
  1089. #define RETSIGTYPE $ac_cv_type_signal
  1090. EOF
  1091.  
  1092.  
  1093. for ac_func in _setjmp system sigsetmask memcpy strchr
  1094. do
  1095. /bin/echo $ac_n "checking for $ac_func""... $ac_c" 1>&4
  1096. if eval "test \"`echo '${'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1097.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  1098. else
  1099.   cat > conftest.$ac_ext <<EOF
  1100. #line 1101 "configure"
  1101. #include "confdefs.h"
  1102. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1103. /* Override any gcc2 internal prototype to avoid an error.  */
  1104. char $ac_func(); 
  1105.  
  1106. int main() { return 0; }
  1107. int t() {
  1108.  
  1109. /* The GNU C library defines this for functions which it implements
  1110.     to always fail with ENOSYS.  Some functions are actually named
  1111.     something starting with __ and the normal name is an alias.  */
  1112. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1113. choke me
  1114. #else
  1115. $ac_func();
  1116. #endif
  1117.  
  1118. ; return 0; }
  1119. EOF
  1120. if eval $ac_link; then
  1121.   rm -rf conftest*
  1122.   eval "ac_cv_func_$ac_func=yes"
  1123. else
  1124.   rm -rf conftest*
  1125.   eval "ac_cv_func_$ac_func=no"
  1126. fi
  1127. rm -f conftest*
  1128.  
  1129. fi
  1130. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1131.   /bin/echo "$ac_t""yes" 1>&4
  1132.     ac_tr_func=HAVE_`/bin/echo $ac_func | tr '[a-z]' '[A-Z]'`
  1133.   cat >> confdefs.h <<EOF
  1134. #define $ac_tr_func 1
  1135. EOF
  1136.  
  1137. else
  1138.   /bin/echo "$ac_t""no" 1>&4
  1139. fi
  1140. done
  1141.  
  1142. /bin/echo $ac_n "checking for tcgetattr""... $ac_c" 1>&4
  1143. if eval "test \"`echo '${'ac_cv_func_tcgetattr'+set}'`\" = set"; then
  1144.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  1145. else
  1146.   cat > conftest.$ac_ext <<EOF
  1147. #line 1148 "configure"
  1148. #include "confdefs.h"
  1149. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1150. /* Override any gcc2 internal prototype to avoid an error.  */
  1151. char tcgetattr(); 
  1152.  
  1153. int main() { return 0; }
  1154. int t() {
  1155.  
  1156. /* The GNU C library defines this for functions which it implements
  1157.     to always fail with ENOSYS.  Some functions are actually named
  1158.     something starting with __ and the normal name is an alias.  */
  1159. #if defined (__stub_tcgetattr) || defined (__stub___tcgetattr)
  1160. choke me
  1161. #else
  1162. tcgetattr();
  1163. #endif
  1164.  
  1165. ; return 0; }
  1166. EOF
  1167. if eval $ac_link; then
  1168.   rm -rf conftest*
  1169.   eval "ac_cv_func_tcgetattr=yes"
  1170. else
  1171.   rm -rf conftest*
  1172.   eval "ac_cv_func_tcgetattr=no"
  1173. fi
  1174. rm -f conftest*
  1175.  
  1176. fi
  1177. if eval "test \"`echo '$ac_cv_func_'tcgetattr`\" = yes"; then
  1178.   /bin/echo "$ac_t""yes" 1>&4
  1179.   cat >> confdefs.h <<\EOF
  1180. #define HAVE_TERMIOS_FUNCS 1
  1181. EOF
  1182.  
  1183. else
  1184.   /bin/echo "$ac_t""no" 1>&4
  1185. fi
  1186.  
  1187. echo "checking for strerror" 1>&4
  1188. cat > conftest.$ac_ext <<EOF
  1189. #line 1190 "configure"
  1190. #include "confdefs.h"
  1191.  
  1192. #if HAVE_STDIO_H
  1193. #include <stdio.h>
  1194. #endif
  1195. #if HAVE_STRING_H
  1196. #include <string.h>
  1197. #endif
  1198. #if HAVE_ERRNO_H
  1199. #include <errno.h>
  1200. #endif
  1201. int main() { return 0; }
  1202. int t() {
  1203. static char *x; x = strerror(0);
  1204. ; return 0; }
  1205. EOF
  1206. if eval $ac_link; then
  1207.   rm -rf conftest*
  1208.   cat >> confdefs.h <<\EOF
  1209. #define HAVE_STRERROR 1
  1210. EOF
  1211.  
  1212. fi
  1213. rm -f conftest*
  1214.  
  1215. cat > conftest.$ac_ext <<EOF
  1216. #line 1217 "configure"
  1217. #include "confdefs.h"
  1218.  
  1219. int main() { return 0; }
  1220. int t() {
  1221. extern int sys_errlist; static int x; x = sys_errlist;
  1222. ; return 0; }
  1223. EOF
  1224. if eval $ac_link; then
  1225.   rm -rf conftest*
  1226.   cat >> confdefs.h <<\EOF
  1227. #define HAVE_SYS_ERRLIST 1
  1228. EOF
  1229.  
  1230. fi
  1231. rm -f conftest*
  1232.  
  1233. cat > conftest.$ac_ext <<EOF
  1234. #line 1235 "configure"
  1235. #include "confdefs.h"
  1236.  
  1237. int main() { return 0; }
  1238. int t() {
  1239. extern int errno; static int x; x = errno;
  1240. ; return 0; }
  1241. EOF
  1242. if eval $ac_link; then
  1243.   rm -rf conftest*
  1244.   cat >> confdefs.h <<\EOF
  1245. #define HAVE_ERRNO 1
  1246. EOF
  1247.  
  1248. fi
  1249. rm -f conftest*
  1250.  
  1251. echo "checking for locale" 1>&4
  1252. cat > conftest.$ac_ext <<EOF
  1253. #line 1254 "configure"
  1254. #include "confdefs.h"
  1255. #include <locale.h>
  1256. #include <ctype.h>
  1257. int main() { return 0; }
  1258. int t() {
  1259. setlocale(LC_CTYPE,""); isprint(0); iscntrl(0);
  1260. ; return 0; }
  1261. EOF
  1262. if eval $ac_link; then
  1263.   rm -rf conftest*
  1264.   cat >> confdefs.h <<\EOF
  1265. #define HAVE_LOCALE 1
  1266. EOF
  1267.  
  1268. fi
  1269. rm -f conftest*
  1270.  
  1271. echo "checking for ctype" 1>&4
  1272. cat > conftest.$ac_ext <<EOF
  1273. #line 1274 "configure"
  1274. #include "confdefs.h"
  1275.  
  1276. #if HAVE_CTYPE_H
  1277. #include <ctype.h>
  1278. #endif
  1279. int main() { return 0; }
  1280. int t() {
  1281. static int x; x = isupper(x); x = tolower(x); x = toupper(x);
  1282. ; return 0; }
  1283. EOF
  1284. if eval $ac_link; then
  1285.   rm -rf conftest*
  1286.   cat >> confdefs.h <<\EOF
  1287. #define HAVE_UPPER_LOWER 1
  1288. EOF
  1289.  
  1290. fi
  1291. rm -f conftest*
  1292.  
  1293.  
  1294. have_ospeed=no
  1295. echo "checking termcap for ospeed" 1>&4
  1296. cat > conftest.$ac_ext <<EOF
  1297. #line 1298 "configure"
  1298. #include "confdefs.h"
  1299.  
  1300. #include <sys/types.h>
  1301. #if HAVE_TERMIOS_H
  1302. #include <termios.h>
  1303. #endif
  1304. #if HAVE_TERMCAP_H
  1305. #include <termcap.h>
  1306. #endif
  1307. int main() { return 0; }
  1308. int t() {
  1309. ospeed = 0;
  1310. ; return 0; }
  1311. EOF
  1312. if eval $ac_link; then
  1313.   rm -rf conftest*
  1314.   cat >> confdefs.h <<\EOF
  1315. #define HAVE_OSPEED 1
  1316. EOF
  1317.  have_ospeed=yes
  1318. fi
  1319. rm -f conftest*
  1320.  
  1321. if test $have_ospeed = no; then
  1322. cat > conftest.$ac_ext <<EOF
  1323. #line 1324 "configure"
  1324. #include "confdefs.h"
  1325.  
  1326. int main() { return 0; }
  1327. int t() {
  1328. extern short ospeed; ospeed = 0;
  1329. ; return 0; }
  1330. EOF
  1331. if eval $ac_link; then
  1332.   rm -rf conftest*
  1333.   cat >> confdefs.h <<\EOF
  1334. #define HAVE_OSPEED 1
  1335. EOF
  1336.  cat >> confdefs.h <<\EOF
  1337. #define MUST_DEFINE_OSPEED 1
  1338. EOF
  1339.  
  1340. fi
  1341. rm -f conftest*
  1342.  
  1343. fi
  1344.  
  1345.  
  1346. have_regex=no
  1347. echo "checking for POSIX regex.h" 1>&4
  1348. cat > conftest.$ac_ext <<EOF
  1349. #line 1350 "configure"
  1350. #include "confdefs.h"
  1351. #include <sys/types.h>
  1352. #include <regex.h>
  1353. int main() { return 0; }
  1354. int t() {
  1355. regex_t *r; regfree(r);
  1356. ; return 0; }
  1357. EOF
  1358. if eval $ac_link; then
  1359.   rm -rf conftest*
  1360.   cat >> confdefs.h <<\EOF
  1361. #define HAVE_POSIX_REGCOMP 1
  1362. EOF
  1363.  have_regex=yes
  1364. fi
  1365. rm -f conftest*
  1366.  
  1367. if test $have_regex = no; then
  1368. /bin/echo $ac_n "checking for regcmp""... $ac_c" 1>&4
  1369. if eval "test \"`echo '${'ac_cv_func_regcmp'+set}'`\" = set"; then
  1370.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  1371. else
  1372.   cat > conftest.$ac_ext <<EOF
  1373. #line 1374 "configure"
  1374. #include "confdefs.h"
  1375. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1376. /* Override any gcc2 internal prototype to avoid an error.  */
  1377. char regcmp(); 
  1378.  
  1379. int main() { return 0; }
  1380. int t() {
  1381.  
  1382. /* The GNU C library defines this for functions which it implements
  1383.     to always fail with ENOSYS.  Some functions are actually named
  1384.     something starting with __ and the normal name is an alias.  */
  1385. #if defined (__stub_regcmp) || defined (__stub___regcmp)
  1386. choke me
  1387. #else
  1388. regcmp();
  1389. #endif
  1390.  
  1391. ; return 0; }
  1392. EOF
  1393. if eval $ac_link; then
  1394.   rm -rf conftest*
  1395.   eval "ac_cv_func_regcmp=yes"
  1396. else
  1397.   rm -rf conftest*
  1398.   eval "ac_cv_func_regcmp=no"
  1399. fi
  1400. rm -f conftest*
  1401.  
  1402. fi
  1403. if eval "test \"`echo '$ac_cv_func_'regcmp`\" = yes"; then
  1404.   /bin/echo "$ac_t""yes" 1>&4
  1405.   cat >> confdefs.h <<\EOF
  1406. #define HAVE_REGCMP 1
  1407. EOF
  1408.  have_regex=yes
  1409. else
  1410.   /bin/echo "$ac_t""no" 1>&4
  1411. fi
  1412.  
  1413. fi
  1414. if test $have_regex = no; then
  1415. cat > conftest.$ac_ext <<EOF
  1416. #line 1417 "configure"
  1417. #include "confdefs.h"
  1418. #include "regexp.h"
  1419. int main() { return 0; }
  1420. int t() {
  1421. regcomp("");
  1422. ; return 0; }
  1423. EOF
  1424. if eval $ac_link; then
  1425.   rm -rf conftest*
  1426.   cat >> confdefs.h <<\EOF
  1427. #define HAVE_V8_REGCOMP 1
  1428. EOF
  1429.  have_regex=yes
  1430. fi
  1431. rm -f conftest*
  1432.  
  1433. fi
  1434. if test $have_regex = no && test -f ${srcdir}/regex.c; then
  1435. cat >> confdefs.h <<\EOF
  1436. #define HAVE_POSIX_REGCOMP 1
  1437. EOF
  1438.  REGEX_O='regex.$(O)'  have_regex=yes
  1439. fi
  1440. if test $have_regex = no && test -f ${srcdir}/regexp.c; then
  1441. cat >> confdefs.h <<\EOF
  1442. #define HAVE_V8_REGCOMP 1
  1443. EOF
  1444.  REGEX_O='regexp.$(O)'  have_regex=yes
  1445. fi
  1446. if test $have_regex = no; then
  1447. /bin/echo $ac_n "checking for re_comp""... $ac_c" 1>&4
  1448. if eval "test \"`echo '${'ac_cv_func_re_comp'+set}'`\" = set"; then
  1449.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  1450. else
  1451.   cat > conftest.$ac_ext <<EOF
  1452. #line 1453 "configure"
  1453. #include "confdefs.h"
  1454. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1455. /* Override any gcc2 internal prototype to avoid an error.  */
  1456. char re_comp(); 
  1457.  
  1458. int main() { return 0; }
  1459. int t() {
  1460.  
  1461. /* The GNU C library defines this for functions which it implements
  1462.     to always fail with ENOSYS.  Some functions are actually named
  1463.     something starting with __ and the normal name is an alias.  */
  1464. #if defined (__stub_re_comp) || defined (__stub___re_comp)
  1465. choke me
  1466. #else
  1467. re_comp();
  1468. #endif
  1469.  
  1470. ; return 0; }
  1471. EOF
  1472. if eval $ac_link; then
  1473.   rm -rf conftest*
  1474.   eval "ac_cv_func_re_comp=yes"
  1475. else
  1476.   rm -rf conftest*
  1477.   eval "ac_cv_func_re_comp=no"
  1478. fi
  1479. rm -f conftest*
  1480.  
  1481. fi
  1482. if eval "test \"`echo '$ac_cv_func_'re_comp`\" = yes"; then
  1483.   /bin/echo "$ac_t""yes" 1>&4
  1484.   cat >> confdefs.h <<\EOF
  1485. #define HAVE_RE_COMP 1
  1486. EOF
  1487.  have_regex=yes
  1488. else
  1489.   /bin/echo "$ac_t""no" 1>&4
  1490. fi
  1491.  
  1492. fi
  1493. if test $have_regex = no; then
  1494. cat >> confdefs.h <<\EOF
  1495. #define NO_REGEX 1
  1496. EOF
  1497.  
  1498. fi
  1499.  
  1500. trap '' 1 2 15
  1501. if test -w $cache_file; then
  1502. echo "updating cache $cache_file"
  1503. cat > $cache_file <<\EOF
  1504. # This file is a shell script that caches the results of configure
  1505. # tests run on this system so they can be shared between configure
  1506. # scripts and configure runs.  It is not useful on other systems.
  1507. # If it contains results you don't want to keep, you may remove or edit it.
  1508. #
  1509. # By default, configure uses ./config.cache as the cache file,
  1510. # creating it if it does not exist already.  You can give configure
  1511. # the --cache-file=FILE option to use a different cache file; that is
  1512. # what configure does when it calls configure scripts in
  1513. # subdirectories, so they share the cache.
  1514. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  1515. # config.status only pays attention to the cache file if you give it the
  1516. # --recheck option to rerun configure.
  1517. #
  1518. EOF
  1519. # Ultrix sh set writes to stderr and can't be redirected directly.
  1520. (set) 2>&1 |
  1521.   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/: \${\1='\2'}/p" \
  1522.   >> $cache_file
  1523. else
  1524. echo "not updating unwritable cache $cache_file"
  1525. fi
  1526.  
  1527. trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  1528.  
  1529. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  1530. # Let make expand exec_prefix.
  1531. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  1532.  
  1533. # Any assignment to VPATH causes Sun make to only execute
  1534. # the first set of double-colon rules, so remove it if not needed.
  1535. # If there is a colon in the path, we need to keep it.
  1536. if test "x$srcdir" = x.; then
  1537.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  1538. fi
  1539.  
  1540. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  1541.  
  1542. DEFS=-DHAVE_CONFIG_H
  1543.  
  1544. # Without the "./", some shells look in PATH for config.status.
  1545. : ${CONFIG_STATUS=./config.status}
  1546.  
  1547. echo creating $CONFIG_STATUS
  1548. # Some systems, like AmigaDOS, won't allow you to remove a script that is
  1549. # being executed, so just move it out of the way instead.
  1550. if test -f $CONFIG_STATUS; then mv $CONFIG_STATUS $CONFIG_STATUS.old; else true; fi
  1551. cat > $CONFIG_STATUS <<EOF
  1552. #!/bin/sh
  1553. # Generated automatically by configure.
  1554. # Run this file to recreate the current configuration.
  1555. # This directory was configured as follows,
  1556. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  1557. #
  1558. # $0 $ac_configure_args
  1559. #
  1560. # Compiler output produced by configure, useful for debugging
  1561. # configure, is in ./config.log if it exists.
  1562.  
  1563. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  1564. for ac_option
  1565. do
  1566.   case "\$ac_option" in
  1567.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  1568.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  1569.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  1570.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  1571.     /bin/echo "$CONFIG_STATUS generated by autoconf version 2.1"
  1572.     exit 0 ;;
  1573.   -help | --help | --hel | --he | --h)
  1574.     echo "\$ac_cs_usage"; exit 0 ;;
  1575.   *) echo "\$ac_cs_usage"; exit 1 ;;
  1576.   esac
  1577. done
  1578.  
  1579. ac_given_srcdir=$srcdir
  1580. ac_given_INSTALL="$INSTALL"
  1581.  
  1582. trap 'rm -fr Makefile defines.h conftest*; exit 1' 1 2 15
  1583.  
  1584. # Protect against being on the right side of a sed subst in config.status. 
  1585. sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; 
  1586.  s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
  1587. $ac_vpsub
  1588. $extrasub
  1589. s%@CFLAGS@%$CFLAGS%g
  1590. s%@CPPFLAGS@%$CPPFLAGS%g
  1591. s%@CXXFLAGS@%$CXXFLAGS%g
  1592. s%@DEFS@%$DEFS%g
  1593. s%@LDFLAGS@%$LDFLAGS%g
  1594. s%@LIBS@%$LIBS%g
  1595. s%@exec_prefix@%$exec_prefix%g
  1596. s%@prefix@%$prefix%g
  1597. s%@program_transform_name@%$program_transform_name%g
  1598. s%@CC@%$CC%g
  1599. s%@CPP@%$CPP%g
  1600. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  1601. s%@INSTALL_DATA@%$INSTALL_DATA%g
  1602. s%@REGEX_O@%$REGEX_O%g
  1603.  
  1604. CEOF
  1605. EOF
  1606. cat >> $CONFIG_STATUS <<EOF
  1607.  
  1608. CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
  1609. EOF
  1610. cat >> $CONFIG_STATUS <<\EOF
  1611. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  1612.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  1613.   case "$ac_file" in
  1614.   *:*) ac_file_in=`/bin/echo "$ac_file"|sed 's%.*:%%'`
  1615.        ac_file=`/bin/echo "$ac_file"|sed 's%:.*%%'` ;;
  1616.   *) ac_file_in="${ac_file}.in" ;;
  1617.   esac
  1618.  
  1619.   # Adjust relative srcdir, etc. for subdirectories.
  1620.  
  1621.   # Remove last slash and all that follows it.  Not all systems have dirname.
  1622.   ac_dir=`/bin/echo $ac_file|sed 's%/[^/][^/]*$%%'`
  1623.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  1624.     # The file is in a subdirectory.
  1625.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  1626.     ac_dir_suffix="/$ac_dir"
  1627.     # A "../" for each directory in $ac_dir_suffix.
  1628.     ac_dots=`/bin/echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  1629.   else
  1630.     ac_dir_suffix= ac_dots=
  1631.   fi
  1632.  
  1633.   case "$ac_given_srcdir" in
  1634.   .)  srcdir=.
  1635.       if test -z "$ac_dots"; then top_srcdir=.
  1636.       else top_srcdir=`/bin/echo $ac_dots|sed 's%/$%%'`; fi ;;
  1637.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  1638.   *) # Relative path.
  1639.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  1640.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  1641.   esac
  1642.  
  1643.   case "$ac_given_INSTALL" in
  1644.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  1645.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  1646.   esac
  1647.   echo creating "$ac_file"
  1648.   rm -f "$ac_file"
  1649.   configure_input="Generated automatically from `/bin/echo $ac_file_in|sed 's%.*/%%'` by configure."
  1650.   case "$ac_file" in
  1651.   *Makefile*) ac_comsub="1i\\
  1652. # $configure_input" ;;
  1653.   *) ac_comsub= ;;
  1654.   esac
  1655.   sed -e "$ac_comsub
  1656. s%@configure_input@%$configure_input%g
  1657. s%@srcdir@%$srcdir%g
  1658. s%@top_srcdir@%$top_srcdir%g
  1659. s%@INSTALL@%$INSTALL%g
  1660. " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  1661. fi; done
  1662. rm -f conftest.subs
  1663.  
  1664. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  1665. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  1666. #
  1667. # ac_d sets the value in "#define NAME VALUE" lines.
  1668. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  1669. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  1670. ac_dC='\3'
  1671. ac_dD='%g'
  1672. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  1673. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1674. ac_uB='\([     ]\)%\1#\2define\3'
  1675. ac_uC=' '
  1676. ac_uD='\4%g'
  1677. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  1678. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1679. ac_eB='$%\1#\2define\3'
  1680. ac_eC=' '
  1681. ac_eD='%g'
  1682.  
  1683. CONFIG_HEADERS=${CONFIG_HEADERS-"defines.h"}
  1684. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  1685.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  1686.   case "$ac_file" in
  1687.   *:*) ac_file_in=`/bin/echo "$ac_file"|sed 's%.*:%%'`
  1688.        ac_file=`/bin/echo "$ac_file"|sed 's%:.*%%'` ;;
  1689.   *) ac_file_in="${ac_file}.in" ;;
  1690.   esac
  1691.  
  1692.   echo creating $ac_file
  1693.  
  1694.   rm -f conftest.frag conftest.in conftest.out
  1695.   cp $ac_given_srcdir/$ac_file_in conftest.in
  1696.  
  1697. EOF
  1698.  
  1699. # Transform confdefs.h into a sed script conftest.vals that substitutes
  1700. # the proper values into config.h.in to produce config.h.  And first:
  1701. # Protect against being on the right side of a sed subst in config.status. 
  1702. # Protect against being in an unquoted here document in config.status.
  1703. rm -f conftest.vals
  1704. cat > conftest.hdr <<\EOF
  1705. s/[\\&%]/\\&/g
  1706. s%[\\$`]%\\&%g
  1707. s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  1708. s%ac_d%ac_u%gp
  1709. s%ac_u%ac_e%gp
  1710. EOF
  1711. sed -n -f conftest.hdr confdefs.h > conftest.vals
  1712. rm -f conftest.hdr
  1713.  
  1714. # This sed command replaces #undef with comments.  This is necessary, for
  1715. # example, in the case of _POSIX_SOURCE, which is predefined and required
  1716. # on some systems where configure will not decide to define it.
  1717. cat >> conftest.vals <<\EOF
  1718. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  1719. EOF
  1720.  
  1721. # Break up conftest.vals because some shells have a limit on
  1722. # the size of here documents, and old seds have small limits too.
  1723. # Maximum number of lines to put in a single here document.
  1724. ac_max_here_lines=12
  1725.  
  1726. rm -f conftest.tail
  1727. while :
  1728. do
  1729.   ac_lines=`grep -c . conftest.vals`
  1730.   # grep -c gives empty output for an empty file on some AIX systems.
  1731.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  1732.   # Write a limited-size here document to conftest.frag.
  1733.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  1734.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  1735.   echo 'CEOF
  1736.   sed -f conftest.frag conftest.in > conftest.out
  1737.   rm -f conftest.in
  1738.   mv conftest.out conftest.in
  1739. ' >> $CONFIG_STATUS
  1740.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  1741.   rm -f conftest.vals
  1742.   mv conftest.tail conftest.vals
  1743. done
  1744. rm -f conftest.vals
  1745.  
  1746. cat >> $CONFIG_STATUS <<\EOF
  1747.   rm -f conftest.frag conftest.h
  1748.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  1749.   cat conftest.in >> conftest.h
  1750.   rm -f conftest.in
  1751.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  1752.     /bin/echo "$ac_file is unchanged"
  1753.     rm -f conftest.h
  1754.   else
  1755.     rm -f $ac_file
  1756.     mv conftest.h $ac_file
  1757.   fi
  1758. fi; done
  1759.  
  1760.  
  1761.  
  1762. exit 0
  1763. EOF
  1764. chmod +x $CONFIG_STATUS
  1765. rm -fr confdefs* $ac_clean_files
  1766. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS
  1767.  
  1768.